Machining program producing apparatus

ABSTRACT

An input data check control portion, which compares input data with a decimal point check target word (step  64, 65 ) and, issues a warning when the input data is the decimal point check target word and the numerical value data of the input data is not given a decimal point (step  66 ), is provided. This structure enables the prevention of input mistakes of coordinate data and the like, which are easily made at the time of manual programming of a machining program for an NC machine tool, and also enables said input mistakes to be easily found.

TECHNICAL FIELD

The present invention relates to a program generating apparatus thatgenerates a machining program for controlling a numerical control(herein after abbreviated as “NC”) machine tool, and more specificallyto a technique with which it is possible to judge the validity of adecimal point input with reference to input data during the key inputfor a machining program or after the generation of the machining programand, if there is inappropriateness as to the presence or absence of thedecimal point input or as to the input data, it is possible to requestan operator to make a correction by issuing a notification to him/her.

BACKGROUND ART

When a newly created machining program is executed by an NC machinetool, if command data of the machining program contains mistakes, thereoccurs a situation where an unexpected movement is made and propermachining becomes impossible due to interference between a tool and awork or a machine. Accordingly, when a machining program is applied tomachining for the first time, before actual machining, the program ischecked and it is confirmed that no mistakes have been made in a formatand a tool path.

Examples of program mistakes that are generally and frequently madeduring manual programming are a decimal point input omission, a decimalpoint position mistake, excessive largeness/excessive smallness of aninput value, an input omission of an item that should be specified, andthe like. These mistakes ascribable to input mistakes are easily made,but it is difficult to visually find them. With a program check methodthat has conventionally been used in order to find these programmistakes, there are performed a visual check of data and a format of amachining program displayed on a display device attached to an NCdevice, a syntax check through typical analysis using a decoding meansin an NC device, a visual check of whether a desired path is drawn bydisplaying a tool path, a check of whether a program end point reaches apredetermined position, and the like.

When an operator of an NC machine tool performs a check of every inputmistake made during programming with the conventional method, thisplaces a heavy mental load on the operator. Also, in particular, when anoperator checks his/her inputted program by himself/herself, it isdifficult to completely find program mistakes.

Further, the checks other than the visual check by the operator of thedata or the format of the machining program displayed on the displaydevice attached to the NC device are performed after the generation ofthe machining program is completed and the machining program is analyzedby the NC device. That is, the conventional NC device is not providedwith a function of performing an error check by the NC device itselfduring the generation of the machining program or performing an errorcheck before the completed machining program is analyzed.

It should be noted here that although slightly differing from theproblems described above, a technique of solving similar problems isdisclosed in JP 62-226310 A. In this patent document, there is discloseda technique with which it is checked whether an error (omission of data,simultaneous setting, inversion of the upper limit and the lower limitof a limit value, or too-much-close state) is contained in data settingcontents for regulating a profiling operation method and an operationrange in profiling control, and a message corresponding to the errordetected as a result of this check is displayed. With this technique,however, the validity of an input value itself, that is, whether theinput value estranges from a value that should be originally commandedis not checked.

Further, JP 11-85256 A discloses a technique with which the kinds, thenumbers of times of occurrence, the occurrence dates and times, theoccurrence screens, and the occurrence console modes of error messagesissued at the time of operation mistakes are displayed through themonitoring and control of a power system performed using a console and aCRT screen of a computer system, thereby allowing an operator to graspthe tendency of operation mistakes to be made by human beings and toprevent the operation mistakes. However, the contents of this techniquerelate to the monitoring and control of the power system and does notrelate to a machining program generating apparatus to which the presentinvention relates. In addition, with this technique, there are notperformed the displaying of caution messages concerning errors in thedescending order of the numbers of times of occurrence of warnings andthe graphical displaying of the numbers of times of occurrence of thewarnings.

DISCLOSURE OF THE INVENTION

The present invention has been made by focusing attention on theconventional problems and has an object of providing a machining programgenerating apparatus that is capable of alleviating a load placed on anoperator who creates a machining program for numerical control.

Further, the present invention has another object of providing amachining program generating apparatus that is capable of achieving animprovement in the quality of programming and motivating an operator toimprove his/her programming skill.

The present invention has been made to achieve the objects describedabove. The present invention provides a machining program generatingapparatus for generating a machining program for numerical control,including: an input portion for inputting machining program data; a datadisplay portion for displaying the data inputted from the input portion;a decimal point check target word storage portion for storing a decimalpoint check target word; and an input data check control portion forcomparing the input data with the decimal point check target word and,if the input data is the decimal point check target word and no decimalpoint is given to numerical value data of the input data, issuing awarning.

With this construction, it becomes possible to prevent a decimal pointinput omission at the time of programming, to reduce the time for aprogram check as to the decimal point input omission, and to improve theefficiency of generation of a machining program.

Further, there is provided a machining program generating apparatus forgenerating a machining program for numerical control, including: aninput portion for inputting machining program data; a data displayportion for displaying the data inputted from the input portion; adecimal point check target word storage portion for storing a decimalpoint check target word; a warning judgment value storage unit forstoring a predetermined warning judgment value; and an input data checkcontrol portion for comparing the input data with the decimal pointcheck target word and, if the input data is the decimal point checktarget word, comparing numerical value data of the input data with thewarning judgment value and, if the numerical value data of the inputdata is larger or smaller than the warning judgment value, issuing awarning.

Further, there is provided a machining program generating apparatus forgenerating a machining program for numerical control, including: aninput portion for inputting machining program data; a data displayportion for displaying the data inputted from the input portion; adecimal point check target word storage portion for storing a decimalpoint check target word; a decimal point input specification storageportion for storing whether the apparatus adopts a specification whereif the input data is not given a decimal point, the data is to be dealtwith as data in a minimum command unit; a warning judgment value storageunit for storing a warning judgment value corresponding to the apparatusspecification where if the input data is not given a decimal point, thedata is to be dealt with as data in the minimum command unit and awarning judgment value under an apparatus specification where if theinput data is not given a decimal point, the data is to be dealt with asdata in a mm unit; and an input data check control portion for comparingthe input data with the decimal point check target word and, if theinput data is the decimal point check target word, comparing numericalvalue data of the input data with the warning judgment valuecorresponding to the specification and stored in the warning judgmentvalue storage portion, and if the numerical value data of the inputteddata is larger or smaller than the warning judgment value, issuing awarning.

Further, in the machining program generating apparatus, the warningjudgment value is a reference value for checking a value that makes theinput data as an unnatural input value.

With this construction, it becomes possible to prevent the input of aninvalid numerical value at the time of programming and to shorten thetime for performing a program check, which improves the efficiency ofgeneration of a machining program. Also, even if warning judgment valuesfor apparatuses under different specifications are stored as the warningjudgment value, it becomes possible to perform an input data check usinga warning judgment value corresponding to the specification of a targetapparatus, which makes it possible to prevent misjudgment at the time ofan input data check.

Further, there is provided a machining program generating apparatus forgenerating a machining program for numerical control, including: aninput portion for inputting machining program data; a data displayportion for displaying the data inputted from the input portion; a Gcode supporting indispensable input item storage portion for storingindispensable input items constituting a G command; and an input datacheck control portion for comparing the input data with theindispensable input items constituting the G command and, if any of theindispensable input items are omitted in the input data, issuing awarning.

With this construction, it becomes possible to discriminate/solve aninput omission of an indispensable command item with ease even if amachining program is not executed. As a result, it becomes possible toshorten the time required to perform a program check and correction,which improves the efficiency of generation of a machining program.

Further, in the machining program generating apparatus, the input datacheck control portion performs the comparison each time data input isperformed.

With this construction, a program check can be performed each time adata input is performed, so that it is possible to immediately make acorrection when a data input mistake is made.

Further, in the machining program generating apparatus, the input datacheck control portion performs the comparison in a batch manner afterthe generation of the machining program through the inputting of thedata and before analysis of the machining program.

With this construction, unlike in the case of a sequential check,program checks such as a decimal point input omission check arecollectively performed without being disturbed by a warning notificationissued each time an input operation is performed, so that the efficiencyof generation of a machining program is improved.

Further, the machining program generating apparatus further includes awarning message storage portion for storing a warning message, and inthe machining program generating apparatus, the warning message storedin the warning message storage portion is displayed on the data displayportion.

Further, the machining program generating apparatus further includes: ahistory counter for, when warnings are detected as a result of the inputdata check, recording numbers of times of occurrence of the warnings inaccordance with the contents of the warnings for each of at least oneprogramming operation; and a caution message storage portion for storingcaution messages, and in the machining program generating apparatus, thecaution messages for urging cautions in performing programming aredisplayed on the data display portion in a descending order of thenumbers of times of occurrence of the warnings based on the contentslastly recorded in the history counter.

With this construction, it becomes possible for an operator to recognizecautions in performing programming, which contributes to the suppressionof simple input mistakes. As a result, the efficiency of generation of amachining program is improved.

Further, the machining program generating apparatus further includes: ahistory counter for, when warnings are detected as a result of the inputdata check, recording numbers of times of occurrence of the warnings inaccordance with the contents of the warnings independently of at leastone programming operation; and a history message storage portion forstoring a history message, and in the machining program generatingapparatus, prior to programming, the numbers of times of occurrence ofthe warnings at the time of previous programming operations aregraphically displayed on the data display portion in a time-seriesmanner through analysis of the contents recorded in the history counter,and the history message is also displayed.

With this construction, it becomes possible for an operator toobjectively recognize his/her current proficiency in the programmingtechnique and to be motivated, which contributes to the suppression ofsimple input mistakes. As a result, the efficiency of generation of amachining program is improved.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of warning history displaying according to afirst embodiment of the present invention.

FIG. 2 is a block diagram of an NC device according to the firstembodiment of the present invention.

FIG. 3 is an interpretation correspondence table among decimal pointinput specifications, minimum command units, and input data according tothe first embodiment of the present invention.

FIG. 4 shows an example of a construction of a history counter accordingto the first embodiment of the present invention.

FIG. 5 is a main processing flowchart of a program check/confirmationaccording to the first embodiment of the present invention.

FIG. 6 is an operator ID input processing flowchart according to thefirst embodiment of the present invention.

FIG. 7 is an ID correspondence information display processing flowchartaccording to the first embodiment of the present invention.

FIG. 8 is a caution message display processing flowchart according tothe first embodiment of the present invention.

FIG. 9 is a warning history display processing flowchart according tothe first embodiment of the present invention.

FIG. 10 is a decimal point omission unconditional warning processingflowchart according to the first embodiment of the present invention.

FIG. 11 is an input mistake warning processing flowchart throughsequential processing according to the first embodiment of the presentinvention.

FIG. 12 shows examples of warning judgment values according to the firstembodiment of the present invention.

FIG. 13 is an input data discrimination preparation processing flowchartaccording to the first embodiment of the present invention.

FIG. 14 is an input data comparison processing flowchart according tothe first embodiment of the present invention.

FIG. 15 is a command item omission check processing flowchart accordingto the first embodiment of the present invention.

FIG. 16 is a G2/G3 input omission check flowchart according to the firstembodiment of the present invention.

FIG. 17 is an input mistake warning re-execution processing flowchartaccording to the first embodiment of the present invention.

BEST MODE FOR CARRYING OUT THE INVENTION First Embodiment

A first embodiment of the present invention will now be described withreference to FIGS. 1 to 17.

FIG. 1 shows an example of screen displaying of a warning history, inwhich based on an analysis result of contents of warnings issued at thetime of previous machining program input operations by an operator whointends to generate a machining program hereafter, cautions to beobserved by the operator in his/her inputting the program as well as thecontents of the warnings and the number of times of the warnings issuedduring previous multiple programming operations performed by him/her aregraphically displayed in a time-series manner. It should be noted herethat these messages are stored in a caution message table 46 and ahistory message table 47 to be described later.

In this first embodiment, a warning message is displayed when a datainput mistake is made during programming. As to the warning message,four kinds of warning messages, “REQUIRED DATA IS OMITTED”, “IS DECIMALPOINT OMITTED?”, “DECIMAL POINT MAKES INPUT VALUE EXCESSIVELY LARGE”,and “INPUT VALUE IS ABNORMAL IF DECIMAL POINT IS NOT GIVEN”, areprepared in advance so as to correspond to the contents of inputmistakes, and these warning messages are stored in a warning messagetable 45 to be described later.

Next, a construction and processing contents of an NC device forperforming the displaying shown in FIG. 1 will be described.

FIG. 2 is a block diagram showing an example of the construction of theNC device described above. In FIG. 2, a CPU 1 is connected to a memory2, reads a control program stored in a control program area 3 of thememory 2 one step at a time, performs analysis/execution usingparameters stored in a parameter area 4 of the memory 2 and variouskinds of data stored in a data area 5, and achieves a predeterminedfunction of the NC device. Also, a machining program is stored in amachining program area 6 of this memory 2. A setting display panel 7 forinputting/outputting various kinds of data, which serves as an inputportion and a data display portion is connected to the CPU 1 through asetting display panel interface (hereinafter abbreviated as “I/F”) 8.

Further, a drive control portion 10 is connected to the CPU 1 through adrive portion input/output I/F 9. The drive control portion 10 suppliesdrive power to a motor 11 for machine driving and also performs controlby internally using feedback information from a detector provided forthe motor 11. Note that the feedback information is also written by theCPU 1 into the data area 5 of the memory 2. Further, a machine controlsignal input/output I/F 12 is connected to the CPU 1, through whichlamps and relays on a control panel 13 are driven and signals fromvarious switches are taken in and written into the data area 5 of thememory 2. A program input/output device 14 is also connected to the CPU1 via an input/output device I/F 15.

The details of the memory 2 are developed and shown below the memory 2in FIG. 2, in which the memory 2 is divided into the control programarea 3, the parameter area 4, the data area 5, and the machining programarea 6.

In the parameter area 4, for instance, a system parameter 21, a axisparameter 22, a spindle parameter 23, and the like are stored. In thisarea, there are further contained various tables necessary in this firstembodiment that are a decimal point check target G code table 40, adecimal point check target word table (decimal point check target wordstorage portion) 41, a warning judgment value table (warning judgmentvalue storage portion) 42, an item omission target G code table 43, a Gcode supporting indispensable address table (G code supportingindispensable input item storage portion) 44, a warning message table(warning message storage portion) 45, a caution message table (cautionmessage storage portion) 46, and a history message table (historymessage storage portion) 47. Note that the caution message table 46 is atable that stores messages to be displayed in the upper half of thescreen in FIG. 1 and the history message table 47 is a table that storesmessages to be displayed in the lower half of the screen in FIG. 1.Also, the warning message table 45 is a table that stores the warningmessages described above (“REQUIRED DATA IS OMITTED”, “IS DECIMAL POINTOMITTED?”, “DECIMAL POINT MAKES INPUT VALUE EXCESSIVELY LARGE”, and“INPUT VALUE IS ABNORMAL IF DECIMAL POINT IS NOT GIVEN”).

In the system parameter 21 area (decimal point input specificationstorage portion), there are set a minimum command unit flag (flagshowing to which one of command units “10 μ, 1 μ, Sub μ” shown in FIG. 3the NC device is set), a mm processing flag−and the like. The mmprocessing flag is a flag showing under which one of the NC data inputspecifications shown in FIG. 3 the NC device is set, where there are a“decimal point required” type in which in order to interpret an inputcommand value (25, for instance) as “25 mm”, it is required to inputthis value as “25.” with a decimal point (for instance, in a 1 μm unit,if a decimal point is not given, this value is interpreted as “25” μm),and a “decimal point unnecessary” type in which it is sufficient thatthe value “25” is inputted as it is (if no decimal point is given, thevalue is automatically regarded as a value in the mm unit).

In the data area 5 of the memory 2, for instance, there are stored axisdata 26, spindle data 27, a PLC (programmable logic controller) data 28,display I/F data 29, and the like and there are further containedvarious kinds of data necessary in this first embodiment such as IDinformation 48, a warning counter 49, a history counter 50, andhighlight information 52.

Further, in the control program area 3 of the memory 2, there are storeda screen processing portion 31 for performing screen displaying on thesetting display panel 7, an operation panel processing portion 32 forreading keyboard signals of the setting display panel 7 and performingprocessing in accordance with the read signals, an analysis processingportion 33 for analyzing various commands for NC commanded in amachining program, an interpolation processing portion 34 for generatinga predetermined straight-line or circular path based on data of astraight line command or a circular command commanded in the machiningprogram, an NC axis control portion 35 for performing conversion into amovement distance of each axis per unit time based on the interpolationdata, a spindle control portion 36 for generating a spindle controlsignal based on a spindle command commanded in the machining program, aPLC program 37 for controlling various operations of the machining tool,a reading processing portion 38 for reading various programs bycontrolling the program input/output device 14, and the like. Further,the control program area 3 stores an input data check control portion 39of this first embodiment.

Next, an operation of the NC device having the construction shown inFIG. 2 will be described.

The CPU 1 is capable of performing a manual operation, an automaticoperation, and the like by reading one step at a time the controlprogram, which is stored in the control program area 3 of the memory 2and is software for realizing various functions such as the manualoperation, the automatic operation, and the like of the NC device, andexecuting the read control program. At this time, the control of a toolpath and the input/output into/from the setting display panel 7 areperformed with reference to various parameters determined and set inaccordance with the specification of a machine system and various kindsof data showing a machine position and the like. The machining programis inputted by operating a keyboard of the setting display panel 7.Alternatively, the machining program was created outside and is recordedon a recording medium such as a floppy disk. In this case, the recordingmedium is set in the program input/output apparatus 14 and the programis read through the input/output device I/F 15 under control by the readprocessing unit 38. In either case, the program is stored in the memory2 through the CPU 1.

The machining program is read one block at a time through automaticoperation processing by the control program. Then, the analysisprocessing portion 33 analyzes the read NC command and creates the axisdata 26 and the spindle data 27 composed of a command position, amachine position, and the like for each control axis with reference tovalues set in the system parameter 21 that determines the specificationof the NC device and the specification of a common portion of themachine, the axis parameter 22 that determines the stroke of eachcontrol axis and the specification of a limit speed and the like, thespindle parameter 23 that determines the specification of the spindlefor grabbing and rotating a work or a tool, and the like.

The interpolation processing portion 34 performs calculation withreference to an output result of the analysis processing portion 33. Inthe case of a G01 command, the interpolation processing portion 34calculates a movement amount for each axis per control unit time in theNC device so as to realize a movement on a straight line from a currentposition to a commanded position based on the commanded position and acommanded speed specified by coordinate values on X, Y, and Z axes. Inthe case of a G02 or G03 command, the interpolation processing portion34 calculates a movement amount for each axis per control unit time inthe NC device so as to realize a movement at a commanded speed on acircle having a curvature whose center exists at a point specified withcoordinate values on I, J, and K axes from the current position to thecommanded position on the X, Y, and Z axes. Then, the interpolationprocessing unit 34 stores the calculated movement amount at an address(memory address) corresponding to each axis in the data 26 area.

The NC axis control portion 35 performs acceleration/decelerationprocessing and the like based on the interpolation data calculated bythe interpolation processing portion 34 and outputs the movement amountof each axis at every moment to the drive control portion 10 through thedrive portion input/output I/F 9.

The drive control portion 10 amplifies/converts the axis movement amountto drive power of the motor 11 and drives the motor 11 to a desiredrotation angle. Here, the angle data, by which the rotation drive isperformed, is fed back to the drive control portion 10 as a detectoroutput and constitutes a closed loop. Also, a difference between thecommanded position and the machine position is detected and is convertedinto drive signal/power as a position error signal. Further, thisfeedback signal is inputted/updated in the axis data 26 area through thedrive portion input/output I/F 9.

In the case of a spindle command for rotationally driving the tool orthe work, in the machining program, the number of rotations is commandedafter the G01 command (straight line command), the G02 command(clockwise circular command) or the G03 command (counter clockwisecircular command) and a position command (coordinate value) and anaddress “S” showing the spindle. Like in the case of the control axis,this spindle command is inputted from the analysis processing portion 33into the spindle control portion 36, which then inputs a rotation numbersignal into the spindle drive control portion 10 through the spindledrive portion input/output I/F 9. The spindle drive control portion 10amplifies/converts the spindle rotation number into drive power for themotor 11 and the motor 11 is driven at a desired number of rotations.Here, the rotation data, with which rotation drive is performed,constitutes a closed loop through feedback to the spindle drive controlportion 10 as a detector output, rotationally drives the spindle at acommanded number of rotations, and rotationally drives the tool or thework grabbed by the spindle.

The PLC program 37 is software that executes the relay sequence and thelike of the machine tool and cooperates with an auxiliary command, atool command, and the like issued from the machining program, therebyperforming turning on/off control of an indicator of a heavy currentcircuit provided on the control panel, a not-shown machine operationpanel, and the like and reading processing of a switch signal throughthe machine control signal input/output I/F 12.

A general NC device is controlled in the manner described above andcarries out machining commanded by the machining program.

Next, characteristic operations of this first embodiment will bedescribed.

The input data check control portion 39 in the control program displaysan ID information input request screen on the setting display panel 7,and in order to identify the operator who is attempting to operate theNC device, requests him/her to input his/her ID information 48. Then,the input data check control portion 39 checks whether the inputted IDinformation 48 is registered in the ID information 48 area in the dataarea 5. If the ID information is not yet registered, it is newlyregistered. If the information is already registered, an analysis resultof operation mistakes made by the operator during previous programmingoperations shown in FIG. 1 is displayed on the setting display panel 7.

The decimal point check G code table 40 in the parameter area 4 is a Gcode collection where G commands (G00, G01, G02, G03, . . . ) arecollected which each contain an address word (hereinafter simplyreferred to as the “address” or “word” in some cases) that is capable ofusing a decimal point. Searching of the table is performed using anarbitrary G code as a key and, if a matching code exists, it is judgedthat there is a possibility that a decimal point valid address may becommanded in the G command.

The decimal point check target word table 41 is provided for each G coderegistered in the decimal point check G code table 40 and is acollection of addresses that are each capable of using a decimal pointin the G command. Searching of the table is performed using an arbitraryaddress as a key and, if a matching result is obtained, it is judgedthat the address is a decimal point valid address.

The warning judgment value table 42 is a table of parameters storingvalues for judging that it is required to confirm whether an inputtednumerical value is appropriate or inappropriate. With the values, forinstance, it is judged that a numerical value commanded at an arbitraryaddress in an arbitrary G command does not exceed a maximum/minimumcommand value (value not supported by the system of the NC device)provided from the system side of the NC device but is excessivelysmall/excessively large as a value ordinarily commanded in considerationof the size of a machining table and a work to be machined.

Further, the item omission target G code table 43 is a collection of Gcodes (such as G02 and G03) for which it is required to monitor itemsthat are currently inputted because an error will occur if any iteminput omission is made to a currently inputted G command.

The indispensable address table 44 stores a group of G commandindispensable addresses (I, J, I of G02 and G03 in the case of centerspecification, and R and the like of G02 and G03 in the case of radiusspecification) for each G code registered in the item omission target Gcode table 43. It is judged whether any address is omitted by comparinginput data with the table 44.

If an input value is judged as abnormal as a result of an input datacheck, the warning message described above stored in the warning messagetable 45 is displayed in accordance with its contents, therebyrequesting the operator to confirm whether the numerical value isappropriate or inappropriate and to perform a correction input. Then,the contents of the warning counter 49 corresponding to the warningcontents in the data area 5 are counted up (+1). When the programming isfinished, the contents of the warning counter 49 are stored in thehistory counter 50 for the operator. Here, the history counter 50 isconstructed so as to be capable of storing histories concerning fiveprevious programming operations, for instance, with histories beforethat being overwritten and deleted.

As described above, as to the history counter 50, when the operatorinputs the ID information 48, data of the history counter 50corresponding to the ID information is read, corresponding cautionmessages (whose concrete contents are shown in FIG. 1) in the cautionmessage table 46 are displayed in the descending order of the countvalues of the warning counter 50 concerning the previous programmingoperations. Further, the count values of the history counter 50 areconverted into a graph in a time-series manner and are displayed alongwith corresponding history messages in the history message table 47(whose concrete contents are shown in FIG. 1).

It should be noted here that the details of the various control programsstored in the input data check control portion 39 described above willbe described later with reference to flowcharts.

The screen processing portion 31 displays the display characters at apredetermined address in a predetermined color in accordance with thehighlight information 52 stored in the highlight information areadescribed above. The resetting of the highlight is achieved by clearing(initializing) the designated color information in the highlightinformation area.

FIG. 3 is a table showing how inputted numerical value data isinterpreted depending on whether the data is given a decimal point ornot in a system adopting a minimum command unit (for instance, any oneof 10 μm, 1 μm, and Sub μm) predetermined by the machine of the NCdevice in the case of a specification, in which if the input data of theNC device is not given a decimal point, the input data is dealt with inthe minimum command unit, and a specification in which if the input datais not given a decimal point, the data is dealt with in the mm unit.Note that data concerning these specifications is stored in the systemparameter 21 area of the memory 2 described above.

As shown in this table, for instance, in the case of the decimal pointinput necessary type under the 1 μm command (1=1 μm) specification, ifdata without a decimal point is inputted, this data is interpreted inthe 1 μm unit and, if data with a decimal point is inputted, the inputdata is interpreted as commanded (in the mm unit). On the other hand, inthe case of the decimal point input unnecessary type, if data without adecimal point is inputted, the input data is interpreted in the 1 mmunit and, if data with a decimal point is inputted, this data isinterpreted as commanded (in the mm unit). More specifically, in thecase of a 1 μm command of the decimal point necessary type, forinstance, if a value “123.” (data without “.”) is inputted, this valueis interpreted as “123 μm”. On the other hand, if a value “123.” (datawith “.”) is inputted, this value is interpreted as “123.000 mm”. In thecase of a 1 μm command of the decimal point unnecessary type, regardlessof whether data without “.” (value “123”, for instance) or data with “.”(value “123.”, for instance) is inputted, the same interpretation resultas “123.000 mm” is obtained. In this case, in order to obtain a datainterpretation result as “123 μm”, it is required to input the data as“0.123” or “0.123”.

FIG. 4 shows the detailed contents of the history counter 50, with thecontents of four kinds of input mistake judgments and the number oftimes of occurrence concerning five previous programming operations arestored for each operator.

The concrete contents of the four kinds of input mistakes shown in FIG.4 are as follows.

-   (a) “ITEM OMISSION” denotes a command item input omission and, for    instance, a center position (I, J, K) is not commanded in a circular    (G2) command.-   (b) “DECIMAL POINT OMISSION” indicates a situation where a decimal    point is not given to data of an address that is capable of using a    decimal point.-   (c) “POSITION INCORRECTNESS” denotes a situation where when input    data is given a decimal point under an input specification of the    decimal point necessary (minimum command unit processing) type or    the decimal point unnecessary (mm unit processing) type, the    position of the decimal point is incorrect and an integer part of    the input data becomes larger than a preset value.-   (d) “EXCESSIVELY LARGE/EXCESSIVELY SMALL” indicates a situation    where input data is not given a decimal point under an input    specification of the decimal point necessary (minimum command unit    processing) type and the integer part of the input data becomes    smaller than a preset lower limit value or a situation where input    data is not given a decimal point under a specification of the    decimal point unnecessary (mm unit processing) type and the integer    part of the input data becomes larger than a preset upper limit    value.

Also, “CTa” to “CTd” of the history counter 50 each denote a counterthat stores the number of times of occurrence of its corresponding oneof the warning contents “a” to “d” (corresponding to warning contents(a) data input omission, (b) decimal point input type misunderstanding,(c) decimal point position mistake, and (d) decimal point omission). Thesuffixes “1” to “5” of the counters are numbers respectively assigned tothe most recent five histories concerning programming, with “1” denotingthe latest history and “5” indicating the oldest history. The contentsof these counters are updated by adding “1” to a corresponding warningcounter 49 each time a mistake is made during programming and a warningis issued and by transferring a result of the addition to the historycounter 50 concurrently with the finishing of the programming.

Next, a check method at the time of programming that is a feature ofthis first embodiment will be described using flowcharts.

FIG. 5 is a flowchart showing the processing contents of a program checkand a data confirmation. Here, the details of each operation in thisflowchart will be separately described with reference to a flowchart inwhich the operation is developed.

In Step 01, prior to the inputting of a machining program by an operatorusing the setting display panel 7 of the NC device, a flag is checked inorder to judge whether he/she should be allowed to perform programmingon an edit screen. This flag is set by operator ID processing in step 02and is reset at the time when program generation/check work is finished.That is, an ID input screen is displayed until it is confirmed that anID has been inputted because unless the operator is recognized, it isimpossible to notify him/her about his/her warning history at the timeof previous programming operations and to store a warning resultconcerning programming to be performed hereafter. Accordingly, if theoperator ID is not yet inputted, a negative result is obtained and theprocessing proceeds to step 02; if the operator ID has been inputted,the processing proceeds to step 04 in which processing for programgeneration and check can be performed.

As will be described later (FIG. 6), in step 02, the inputted ID ischecked and, if the ID is not yet registered, the ID is newly registeredby regarding the operator as a new operator. On the other hand, if theID is already registered, the warning histories at the time of theprevious programming operations are read from the history counter 50corresponding to the ID and are analyzed, cautions in performingprogramming are displayed, and changes in warning occurrence (changes inprogramming skill) and the like are displayed in a time-series manner.Then, the processing proceeds to step 03.

In step 03, an operator ID input FG that is the same as the flag checkedin step 01 described above is checked. If a result of the check isnegative, this means that it is impossible to identify the operator, sothat the following processing is skipped and the processing is ended. Ifthe judgment result is positive (flag is set), the processing proceedsto step 04.

In step 04, it is judged whether or not the contents of an operation tobe made hereafter are program generation with reference to the selectionof the switches on the setting operation panel 7. If a result of thejudgment is positive, the processing branches to step 05 in which it isjudged whether a batch check should be performed with reference to theselection of the switches on the setting operation panel 7. If the batchcheck is not selected, the processing proceeds to step 06 in whichsequential check processing is performed. That is, during programming,each time data is sectioned by a decimal point, an address, or anend-of-block (;) through a key input, it is checked whether datainputted immediately before that is appropriate. If it is judged thatdata review is necessary, a warning message is displayed on the settingdisplay panel 7, thereby notifying the operator about the necessity ofthe data review.

It should be noted here that the operator performs processing(correction, confirmation, and the like of the input data) based on thecontents of the notification.

If it is judged in step 05 that the batch check is selected, theprocessing branches to step 08. In addition to the branching from step05, the batch check processing is executed when it is judged in step 04that program generation is not selected and it is judged in step 07 thatthe batch check is selected. This batch check is aimed at increasing thework efficiency by performing checks by one operation after theprogramming is finished. This is because in the case of the sequentialcheck described above, a predetermined warning check is performed eachtime a key input is sectioned, which leads to a possibility thatwarnings is frequently issued. In the case of the batch check in thisfirst embodiment, predetermined checks that are the same as those in thecase of the sequential check are performed on the program contentsdisplayed on the setting display panel 7 and, when the screen isscrolled and a displayed range is changed, step 08 is executed again.

If it is judged in step 07 described above that the batch check is notselected, the check processing is finished.

FIG. 6 is a flowchart showing the details of the operation performed instep 02 shown in FIG. 5.

In step 21, a screen for requesting the operator to input his/her ID isdisplayed on the display screen of the setting display panel 7, and itis checked in step 22 whether data is inputted (for instance, it ischecked whether the input data is “Null”) If a result of this check isnegative, the processing is ended without any work and an ID inputwaiting state is displayed on the screen again. If significant data thatis not “Null” is inputted, the processing proceeds to step 23 in whichthe operator ID input FG is set, and then to step 24 in which IDcorrespondence information display processing is performed. By the IDcorrespondence information display processing (whose details will bedescribed later), the contents of the history counter 50 correspondingto the ID are read and the graphical displaying of cautions inperforming programming operations and changes in the contents ofwarnings issued in the past are performed for the operator based on ananalysis result of the counter contents in the manner shown in FIG. 1.

FIG. 7 shows the detailed processing performed in step 22 in theflowchart shown in FIG. 6.

The ID information 48 area of the memory 2 is an area for storing thename of the operator and a mark or number unique to the operator foridentifying the operator inputted by the operator himself/herself inadvance at the time of the first operation. This information is inputtedby the operator into an ID information input area displayed on thedisplay screen and is stored through a storing operation. The contentsof warnings and the numbers of times of their issuance are stored for apredetermined number of times of programming so as to correspond to theID information 48. The warning counter 49 counts the numbers of warningsthat were each displayed at the time when it was judged that an inputmistake was made, and is stored at a memory address corresponding to theID information of the operator concurrently with the finishing of theprogramming and the storing of the machining program into the memory.

In step 31, it is judged whether the ID code inputted through the IDinput request screen of the setting display panel 7 is an ID codealready registered in the ID information 48 area in the data area 5. Ifit is judged in step 31 that the ID code is already registered, theprocessing proceeds to step 32 in which the head address of the historycounter 50 corresponding to the ID code is read from the ID information48 area.

In step 33, a caution message concerning programming operations isdisplayed with reference to the contents of the history counter 50successively read from the head address.

In step 34, based on the read contents of the history counter 50, thegraphical displaying of the contents of warnings and the numbers oftimes their issuance is performed, and the processing is ended.

If it is judged in step 31 that the inputted ID code is an unregisteredcode, the processing branches to step 35 in which the ID code is storedin the ID information 48 area, the head address of the history countercorresponding to the ID code is determined, the head address is storedin the ID information 48 area, and the processing is ended.

FIG. 8 shows the detailed processing of the caution message displayprocessing (step 33) shown in FIG. 7. First, the contents (count values)of the counters CTa1 to CTd1 are copied from the head address read instep 41 to a not-shown arithmetic memory. In FIG. 8, “CT” stands for acounter, “a” to “d” respectively correspond to the four kinds of warningcontents, and “1” specifies the contents of warnings issued at the timeof the latest programming operation. The history counter is constructedso that it is capable of storing warning contents issued at the time offive previous programming operations, with “1” denoting the latestwarning record, “2” the next latest warning record, and “5” the oldestwarning record.

Instep 42, the counter numbers are arranged in the descending order ofthe copied counter contents, and the caution message corresponding toeach counter number is read from the caution message table 46 and iswritten into the display I/F data 29 area of the data area 5 as thedisplay I/F data 29.

In step 43, information showing the ID code, name, and the like foridentifying the operator is written into the display I/F data 29 area ofthe data area 5 as the display I/F data 29.

Further, a fixed sentence of the caution message, such as “YOU HAVETENDENCY TO MAKE INPUT MISTAKE IN THE FOLLOWING ORDER”, is read from thecaution message table 46 and is written into the display I/F data 29area of the data area 5 as the display I/F data 29 in a like manner.

FIG. 9 shows the detailed processing of the time-series displayprocessing (step 34) shown in FIG. 7.

In step 51, the contents of the counters CTan to CTdn are copied fromthe read head address to the not-shown arithmetic memory. The marks ofthe counters are assigned in the manner described above, although thelast mark “n” is assigned one of “1” to “5”, with “1” corresponding tothe latest history and “5” corresponding to the oldest history.Consequently, in step 51, the counter contents of Cta to CTd concerningone programming operation (set as “one block”) are copied.

In step 52, it is checked whether the transfer of the contentsconcerning all of the five programming operations (all blocks) from “1”to “5” is completed. It is possible to make this judgment by setting aninitial value “5” in a check counter, decrementing this value by oneeach time the processing proceeds to step 52, and checking whether thecounter value becomes “0”. If the transfer of all blocks is not yetcompleted, the processing proceeds to step 53 in which a difference withthe counter address of the next block (whose maximum value becomes “4”because there are provided four counters a, b, c, and d in this firstembodiment) is added and the processing returns to step 51 in which thetransfer of the next block is performed.

If it is judged in step 52 that the transfer of all blocks is completed,the processing branches to step 54 in which the ID information foridentifying the operator is written into the display I/F data 29 area ofthe data area 5 as the display I/F data 29, and the history messages a“DATA INPUT OMISSION” to d “DECIMAL POINT OMISSION RESULTS IN EXTREMELYLARGE/EXTREMELY SMALL VALUE” and a fixed sentence for the historymessages, such as “THE FOLLOWING IS YOUR TENDENCY UNTIL THE LATESTPROGRAMMING OPERATION”, are read from the history message table 47 andare written into a predetermined area of the memory as the display I/Fdata 29. As a result of the processing described above, the IDinformation and the display messages are displayed on the displayportion of the setting display panel 7.

In step 55, the contents of warnings at the time of the five previousprogramming operations transferred from the history counter 50 aregraphically displayed in a time-series manner. In this embodiment, thecontents of warnings at the time of the five previous programmingoperations are respectively assigned X coordinate positions at arbitraryintervals, the numbers of times of their issuance are respectivelyassigned to Y coordinate values to determine intersection coordinates,and they are connected with straight lines by designating colors withbasic graphic commands. In this manner, changes in the numbers of timesof occurrence of the warning are graphically displayed in a time-seriesmanner. By repeatedly executing this processing for each of the countersa, b, c, and d, it is possible to display all warning contents. Thisprocessing is the same as general software processing for graphicallydisplaying a mathematical table and therefore the concrete descriptionthereof is omitted. Like in the case of the history message, the graphedhistory is written into the memory as the display I/F data 29 and isdisplayed on the display portion of the setting display panel 7.

FIG. 10 is a flowchart of the sequential check processing performed instep 06 shown in FIG. 5, with only a check of the presence or absence ofa decimal point being illustrated as an example. This processing hasbeen defined so as to be also applicable to the batch check, with theprocessing concerning the batch check being performed in the last twosteps.

In this example, when no decimal point is inputted into the data of anaddress that is capable of using a decimal point, a warning isunconditionally issued. (In the NC device to which this first embodimentrelates, basically, the decimal point input is performed depending onthe will of the operator, although as a check method, there is provideda case where on the precondition that a decimal point is always inputtedinto an address that is capable of using a decimal point, a warning isissued when no decimal point is inputted by regarding this situation asan input omission. In FIG. 11, in place of the case where only thepresence or absence of a decimal point is checked, there is shown a casewhere checks of the input mistake or input omission of a decimal point,excessively large input value, and excessively small input value, and acheck of the input omission of an indispensable input item aresequentially performed).

In FIG. 10, a G code that is currently inputted is read in step 61. Instep 62, it is checked whether the G code is a target of the decimalpoint check. This operation is performed through searching of thedecimal point check target G code table 40 in which G codes, whose Gcommands each contain an address that is capable of using a decimalpoint, are collected. Here, if the G code is found in the table, theprocessing proceeds to step 63 in which the address of the decimal pointcheck target word table 41 stored so as to correspond to each G code inthe decimal point check target G code table 40 is read. Further, anaddress code to be inputted after the G code is read. If the G code isnot found in step 62, this means that the decimal point check isunnecessary, so that the processing is ended.

In step 64, it is checked whether the address code of the read word data(address word, such as X, Y, Z, and numerical value data following theword that are sectioned through the inputting of an address word or anend-of-block (;)) exists in the decimal point check target word table 41starting from the read address. Here, if a result of the judgment ispositive, the processing proceeds to step 65 in which it is judgedwhether data inputted after the address contains a decimal point. If aresult of the judgment in step 65 is negative, the processing proceedsto step 66 in which it is judged that a decimal point input is omittedbecause the data of an address that is capable of using a decimal pointis not given a decimal point and therefore the warning message “ISDECIMAL POINT OMITTED?” is read from the warning message table 45 and iswritten into the display I/F29. Also, the warning counter b in thewarning counter 49 is counted up by one.

If it is judged in step 64 that the data is not a target of the check orif it is judged in step 65 that the data contains a decimal point, thefollowing processing is skipped.

Step 67 and step 68 are prepared for the batch check and are not appliedto the sequential check. Instep 67, the check mode selected with thesetting display panel 7 is read and, if it is found that the batch checkis selected, the processing proceeds to step 68 in which the startaddress and the end address (or data length) of the word data and adisplay mode (such as the display color and highlight) are written intothe highlight information 52 area. Based on this highlight information52, the screen processing portion 31 displays display information in aregion (from a start point to an end point) designated on the displayscreen in a color of the designated display mode or in a highlightmanner, thereby displaying the designated region in a manner in which itis easily distinguished from other regions. If the batch check is notselected, the processing described above is not performed.

FIG. 11 is a flowchart of processing that is originally performed in thesequential check and FIG. 12 shows a list of three kinds of misinputwarning judgment values in each minimum command unit system of the NCdevice. In this first embodiment, a case where as the judgment values,only one pair for coordinate values, such as X, Y, and Z, is provided isdescribed as an example. However, it is also possible to prepare thejudgment values so as to correspond to other addresses or respectiveaddresses.

FIG. 12 is described here. This table shows a setting example ofparameters (warning judgment value table) for discriminating amongdecimal point giving mistakes and the like for each minimum command unitsystem of 10 μm, 1 μm, or 0.1 μm and, in an actual case, there are usedparameter values on one row in this table that is the same as themachine command unit system. The values set in this table can be changedas appropriate depending on the size of the machine and the like. Notethat as to the names of the parameters, “PD” stands for parameter data,numerical values such as 100 and 010 are each a value obtained bymultiplying the command unit system by 10 (for instance, 10 μisdescribed as “100” and Sub μ (0.1μ) is written as “001”), and “SM”,“DT”, and “LG” at the end of the parameter names respectively stand for“SMALL”, “DECIMAL-POINT”, and “LARGE” that respectively correspond tothe “excessively small”, “decimal point”, and “excessively large”.

In each of these parameters, there is set a boundary value for issuing awarning based on a machine movable range work size in the command unitsystem (10μ, 1μ, 0.1μ) determined by the machine specification. Forinstance, an excessively small command value prevention value is set to“1 mm” (indiscriminately speaking is impossible because there arevarious works, but such a small command value is generallyinconsiderable, so that it is judged that there is made a decimal pointgiving mistake or a mistake in the number of digits of a numerical valuein the minimum command unit), a decimal point addition prevention valueis set to “200” (ordinarily, such a length of 200 mm is not commandedunless a radius value having a large curvature is inputted, so that if adecimal point is given to the end of a numerical value exceeding 200, itis judged that a key input mistake is made), and an excessively largecommand value prevention value is set to “200” for the same reason.However, when the size of a table of the machine, on which a work isplaced, is large, these values may be set in accordance with the maximumsize specified on a machining drawing. In the first embodiment, if nodecimal point is given in a system in which it is possible to use adecimal point, a warning is issued unconditionally. In a second example,however, it is judged whether a command value becomes unnatural withreference to an inputted numerical value and the presence or absence ofa decimal point and, if the value is judged as unnatural, a warning isissued before the determination of the numerical value, thereby urgingan operator to make a correction.

Here, the excessively small command value prevention is a referencevalue with which when no decimal point is given to an input numericalvalue but a mm input (inputted integer is dealt with in a mm unit) isnot performed, it is judged that the inputted numerical value is a verysmall value that is not commanded in usual cases. The decimal pointgiving prevention is a reference value with which it is judged that adecimal point is mistakenly given and therefore a command value becomesexcessively large (in the case of an input of “201.” for instance, thisvalue is interpreted as a command value “201 mm”, but when it is judgedthat such a large value is commanded because a decimal point is given atthe end of the value, if “200” is set in the parameter “PD010DT”, forinstance, it is judged that a set value is exceeded, so that there iswarned the possibility of an input mistake). The excessively largecommand value prevention is a reference value with which it is judgedthat at the time of the mm input, for instance, it is intended to input“20.5” but “205” is mistakenly inputted while omitting a decimal point,so that the command value becomes excessively large. As described above,these values can be set/changed arbitrarily in accordance with themachine or the work.

It should be noted here that in FIG. 12, the units of numerical values(100, 1000, 10000) of the excessively small command value preventiondata are respectively “10μ”, “1μ”, and “Sub micron” (that is, everynumerical value specifies the same length of 1 mm), and the unit of thenumerical value (200) of the decimal point giving prevention and theexcessively large command value prevention is “mm”.

In step 71, the set values “1000”, “200”, and “200” of the three kindsof parameters “PD010SM”, “PD010DT”, and “PD010LG” corresponding to theminimum command unit system (such as 1 μm command, this selection is setin the system parameter 21) of the NC are read from the warning judgmentvalue table 42 shown in FIG. 12.

In step 72, a decimal point check and a validity check of the largenessof an input value are performed. In step 73, an indispensable item inputomission check is performed on a predetermined G command.

FIG. 13 shows processing for reading the parameters for the input valuevalidity check and shows the detailed contents of the processingperformed in step 71 shown in FIG. 11. Instep 81, first, the headaddress of the warning judgment value table is read (offset value givenin each minimum command unit is added to this address, therebydetermining the head address of a desired parameter). In step 82, aninch input flag of the system parameter 21 is checked and, if this flagis set, inch data processing is performed for inch inputting (this isthe same processing as a metric input to be described later and, even inthe case of the inch input, the parameters corresponding to this areread to registers (SM, DT, LG), so that it is possible to perform thecheck in the same manner as in the case of the metric input).

In step 83, a minimum command unit flag of the system parameter 21 ischecked and, if a 0.1 μm flag is set, the processing branches to step 85in which three parameters for the excessively small command valueprevention, the decimal point giving prevention, and the excessivelylarge command value prevention corresponding to the minimum command unit“0.1 μm” are read and respectively written into the arithmetic memoriesSM, DT, and LG. Then, the processing is ended. If it is found in step 83that the flag is not set, the processing proceeds to step 84 in which aminimum command unit flag of the system parameter 21 is checked in alike manner and, if a 1 μm flag is set, the processing branches to step86 in which three parameters corresponding to the minimum command unit“1 μm” are read and respectively written into the arithmetic memoriesSM, DT, and LG. Then, the processing is ended. If it is found in step 84that the flag is not set, the inputted command is regarded as a 10 μmcommand and the processing branches to step 87 in which three parameterscorresponding to the minimum command unit of 10 μm are read andrespectively written into the arithmetic memories SM, DT, and LG. Then,the processing is ended.

FIG. 14 shows the detailed processing of the decimal point check (step72) shown in FIG. 11. The actual check contents include three kinds ofchecks based on comparison with the three parameters that are theexcessively small command value prevention (for judging whether an inputvalue is excessively small or a decimal point is omitted), the decimalpoint giving prevention (if a decimal point is given, the input valuebecomes excessively large), and the excessively large command valueprevention (for judging whether an input value is excessively large or adecimal point position mistake is made).

In step 101, the G code that is currently inputted is read. In step 102,it is checked whether the G code is a target of the decimal point check.This operation is performed through searching of the decimal point checktarget G code table 40 in which G codes, whose G commands each containan address that is capable of using a decimal point, are collected.Here, if the G code is found in the table, the processing proceeds tostep 103 in which there is read the address of the decimal point checktarget word table 41 stored in the decimal point check target G codetable 40 so as to correspond to each G code. Further, the address codeinputted after the G code is read and the head address of the word(storage position of the address code) is stored (here, the storage ofthe head address of the word is the processing required at the time ofthe batch check). If the G code is not found in step 102, this meansthat the decimal point check is unnecessary, so that the processing isended.

In step 104, it is checked whether the address code of the read worddata (address word, such as X, Y, and Z, and a numerical value datafollowing the word that are sectioned through the inputting of anaddress word or an end-of-block (;)) exists in the decimal point checktarget word table 41 starting from the read address. Here, if a resultof the judgment is positive, the processing proceeds to step 105 inwhich the integer part of the data inputted after the address is readand the end address of the word data is further stored (here, the endaddress storage is the processing that is necessary at the time of thebatch check). If a result of the judgment in step 104 is negative, it isnot required to perform a check of the data, so that the processing isended.

In step 106, it is checked whether the mm processing flag in the systemparameter 21 is set. This flag indicates the selection of the input modeof NC data in FIG. 3 that are the “decimal point necessary” type inwhich in order to have an input command value (such as 25) interpretedas “25 mm”, it is required to input this value as “25.” with a decimalpoint (at the time of the 1 μm unit, for instance, if no decimal pointis given, the value is interpreted as “25” μm) and the “decimal pointunnecessary” type in which it is sufficient that the value is merelyinputted as “25” (if no decimal point is given, the value isautomatically regarded as a value in the mm unit). Here, if the flag isset (mm unit processing), the processing proceeds to step 107; if theflag is reset (minimum command unit processing), the processing branchesto step 114.

In step 107, it is checked whether the input data contains a decimalpoint and, if the result is positive, the processing proceeds to step108 in which the integer part read in step 105 described above iscompared with the parameter value DT read in step 85 to step 87 in FIG.13 described above. If the condition of “integer part>DT” is satisfied,the processing proceeds to step 109 in which the warning message c“DECIMAL POINT MAKES INPUT VALUE EXCESSIVELY LARGE” is written into thedisplay I/F 29, the warning counter c is counted up (+1), and theprocessing proceeds to step 110. If the condition of “integer part>DT”is not satisfied in step 108, the processing branches to step 110.

If it is judged in step 107 that no decimal point is contained, theprocessing branches to step 112 in which the integer part and theparameter value LG are compared with each other in a like manner. If thecondition of “integer part>LG” is satisfied, the processing proceeds tostep 113 in which the warning message d “INPUT VALUE IS ABNORMAL IFDECIMAL POINT IS NOT GIVEN” is written into the display I/F 29, thewarning counter d is counted up (+1), and the processing proceeds tostep 110. In step 112, if the condition of “integer part>LG” is notsatisfied, the processing is ended.

In step 106, if the flag is reset (minimum command unit processing), theprocessing branches to step 114 in which it is checked whether a decimalpoint is contained in the input data and, if a decimal point iscontained, the processing further proceeds to step 115 in which theinteger part is compared with a parameter value DT in a like manner. Ifthe condition of “integer part>DT” is satisfied, the processing proceedsto step 116 in which the warning message c “DECIMAL POINT MAKES INPUTVALUE EXCESSIVELY LARGE” is written into the display I/F 29, the warningcounter c is counted up (+1), and the processing proceeds to step 110.If the condition of “integer part>DT” is not satisfied in step 115, theprocessing is ended.

If it is judged in step 114 that no decimal point is contained, theprocessing branches to step 117 in which the integer part is comparedwith a parameter value SM in a like manner. If the condition of “integerpart<SM” is satisfied, the processing proceeds to step 118 in which thewarning message d “INPUT VALUE IS ABNORMAL IF DECIMAL POINT IS NOTGIVEN” is written into the display I/F 29, the warning counter d iscounted up (+1), and the processing proceeds to step 110. In step 117,if the condition of “integer part<SM” is not satisfied, the processingis ended.

In the above description, it is assumed that the number of digits of theinput value is correctly commanded within the maximum number of digits.However, by setting a parameter of the maximum number of inputtabledigits and comparing an input value with the parameter, it is possibleto perform a check of the number of digits of an input value at the timeof inputting and to urge an operator to make a correction by issuing awarning if an excess of digit number occurs. In this case, it ispossible to find the excess of digit number in advance that hasconventionally been impossible unless the machining program isanalyzed/executed after programming. As a result, it becomes possible toenhance the perfection of the machining program.

Step 110 and step 111 are provided in order to perform the decimal pointcheck processing in the batch check mode. In step 110, it is checkedwhether the batch check mode is selected and, if the batch check isselected, the processing proceeds to step 111 in which the start/endaddress and the display mode, such as a highlight display color, of theword data (address+numerical value data), for which the warning judgmenthas been made, are set in the highlight information 52 and theprocessing is ended. Based on the information set in the highlightinformation 52, the screen processing portion 31 highlights and displaysa predetermined range of the machining program displayed on the displayportion of the setting display panel 7.

FIG. 15 shows item omission check processing in which it is checkedwhether the code is registered in the item omission check target G codeparameter 43 (in which the head address of the storage memory of a checkprogram corresponding to the G command codes are stored, so that whenany command items (items) in the G command are omitted and an erroroccurs due to the impossibility of analysis, it is checked whether the Gcode that is currently created is a target code and, if the result ofthe check is positive, the check program is activated and it is checkedwhether any required items are omitted and, if the result of the checkis positive, a warning is issued in order to urge the operator to inputthe items. There is also a check program that is commonly usable likethe G2/G3 code) and, if the code is not registered, this means that acheck is unnecessary. As described above, during the programming of amachining program, it is possible to warn each item omission and to urgean operator to correct the program immediately, so that the perfectionof the machining program is enhanced. Therefore, unlike a conventionalcase, there is eliminated a wasted time from the generation of amachining program to the correction thereof consumed when any commanditem omissions are found for the first time when the machining programis executed by an NC device and the program is re-edited. As a result,the production efficiency is improved.

In step 121, the commanded G code is read and the start address (memoryaddress) and the end address (memory address) of the block are read(this address is information necessary for the batch check) In step 122,it is checked whether the read G code is a target code of the itemomission check. Like in the case of the decimal point check, thisoperation is performed by judging whether the read G code is registeredin the item omission target G code table 43, because target G codes anda predetermined address in an indispensable address check table 44, inwhich the activation addresses (addresses on the memory) of programs forchecking the presence or absence of address codes that are required ineach G command at the minimum are collected so as to correspond torespective G codes, are registered in the item omission target G codetable 43. If the G code is not registered in the table, this means thatthe code is not a target code, so that the processing is ended. If the Gcode is registered, the processing proceeds to step 123 in which theactivation address of a check program of the G command stored so as tocorrespond to the read G code is read and the program is activated.

In step 124, the activated check program is executed and it is checkedwhether input data includes any item omissions. If the result of thischeck is positive, the warning message is set, a warning issuance flagis set, and the processing is ended. In step 125, the warning issuanceflag showing the check result of the item omission check processing ischecked and, if the flag is set, this means that there exist some itemomissions, so that the processing proceeds to step 127 in which thewarning counter “a” corresponding to the ID is counted up (+1). If theflag is not set, this means that all the required data is inputted, sothat the processing is ended.

FIG. 16 is an item omission check program for the G02 or G03 command(clockwise or counterclockwise circular command), for instance.

The circular command includes a center specifying circular command and aradius specifying circular command. In the case of the center specifyingcircular command, it becomes possible to execute this command when therotation direction is commanded with G2 (clockwise) or G3(counterclockwise) and the end position (X, Y, Z) when viewed from thecurrent position and the center position (I, J, K) are commanded. In thecase of the radius specifying circular command, it becomes possible toexecute this command when the rotation direction is commanded with G2(clockwise) or G3 (counterclockwise) and the end position (X, Y, Z) whenviewed from the current position as well as the radius and the directionof the center position (±R) are commanded. Here, except for the case ofa perfect circle, among respective required items, if the end pointcoordinate or the center coordinate is not commanded, it is impossibleto executed the circular command. In a conventional system, however, anerror is not detected until analysis is performed in order to executethe command. Then, machining is suspended and the program is corrected.

In step 131, all the address codes inputted with the G command are read.In step 132, it is checked whether any of codes X, Y, and Z specifyingthe circular end point coordinate value is contained in the read addresscodes.

If the result of the check is positive, the processing proceeds to nextstep 133 in which it is checked whether any of the codes I, J, and Kthat are radius information for specifying the center position iscontained. Here, if any of the codes exits, it is judged as normal andthe processing is ended. If none of the codes I, J, and K exits, thereis a possibility that a radius is specified in order to specify thecircular radius and the center direction, so that the processingproceeds to step 134 in which it is checked whether a code R exists. Ifthe code R does not exist, the processing proceeds to step 135 in whichthe warning message a “REQUIRED DATA IS OMITTED” is written into thedisplay I/F 29 and the warning issuance FG is set.

If the result of the judgment in step 132 is negative, there is apossibility that the command is a perfect circle command where thecurrent position is set as the endpoint, so that the processing proceedsto step 138 in which it is checked whether any of the codes I, J, and Kspecifying the center position is contained and, if the result of thischeck is positive, it is regarded as normal and the processing is ended.On the other hand, if none of the codes I, J, and K exists, it isimpossible to specify the center, so that the processing branches tostep 135 in which warning processing is performed.

Step 136 and step 137 are the processing that is required for the batchcheck. In step 136, it is checked whether the batch check mode isselected and, if the batch check is not selected (if the sequentialcheck is selected), the processing is ended. If the batch check isselected, the processing proceeds to step 137 in which the start/endaddress on the display memory of the block read in step 121 in FIG. 15and a display mode, such as a display color, are set in the highlightinformation and the processing is ended.

FIG. 17 is a flowchart for performing the decimal point check and theitem omission check not in the sequential manner during the inputting ofa program but in the batch manner after the completion of the inputting.

In step 141, it is checked whether the area of the memory displayed onthe display screen of the setting display panel 7 is changed and, if thedisplay screen is scrolled, the change in the display is detected andthe processing proceeds to step 142. In step 142, the head address ofthe display memory is set in a check pointer and the end address of thedisplay memory is set in an end pointer. Also, when a check is activatedfor the first time, this situation is also regarded as a display areachange. In step 141, if no change is made to the display screen area, itis not required to repeat the same check in the same area, so that theprocessing is ended.

In step 143, data of one character is read from an address on thedisplay memory specified by the check pointer and the contents of thecheck pointer are incremented by one (updated). The read character isstored in a predetermined area in the data memory 5 and is set as worddata, and multiple pieces of word data are collected and set as data ofone block (until an end of the block) In step 144, it is judged whetherthe read character is an end-of-block (EOB) and, if not, the processingproceeds to step 145 in which it is checked whether the display memoryarea is exceeded (check pointer>end pointer). If the display memory areais not exceeded, the processing returns to step 143 and the nextcharacter is read. If it is judged in step 145 that the display memoryarea is exceeded, there remains no data that should be checked, so thatthe processing branches to step 149 in which warning informationprocessing is performed.

If it is judged in step 144 that the read character is an EOB, theprocessing proceeds to step 146 in which it is checked whether the readcommand block is the end of the program (M02 or M30). If the result ofthis check is positive, the processing branches to step 149 in which thewarning information processing is performed. If it is judged in step 146that the read command block is not the program end, the processingproceeds to step 147 in which the already-described decimal point checkprocessing is performed. After that, the processing proceeds to step 148in which the already-described item omission check processing isperformed. Then, the processing returns to step 143 to perform a checkof the next block.

Step 149 and step 150 are provided in order to perform post-processingwhen warnings were issued as a result of the decimal point checkprocessing and the item omission check processing. In step 149, thewarning issuance flag is checked, which is to be set if a warning isissued as a result of the decimal point check processing and the itemomission check processing. If no warning was issued, the processingproceeds to step 150 in which a “WARNING NOT-ISSUED” message is writteninto the display I/F 29. If it is found in step 149 that the warningissuance flag is set, automatic displaying is performed based on acorresponding warning portion stored in the highlight display memorythrough the decimal point check processing and the item omission checkprocessing. Therefore, the processing is ended.

It should be noted here that in the above description, as to the warningcounter 49, a count value read from the history counter 50 is updated.Needless to say, however, a corresponding counter in the history counter50 may be directly updated.

Further, the warning message is displayed on the display screen of thesetting display panel 7. However, although the warning may be issued bya sound.

Further, a machining program generating apparatus incorporated into anumerical control apparatus has been described. However, the presentinvention may be applied to an independent machining program generatingapparatus.

Further, it is of course possible to achieve the method of attaining thesame actions and effects as in the embodiment described above even witha technique other than that described above.

INDUSTRIAL APPLICABILITY

As described above, the machining program generating apparatus accordingto the present invention is suitably used as a machining programgenerating apparatus for generating a machining program for numericalcontrol.

1. A machining program generating apparatus for generating a machiningprogram for numerical control, comprising: an input portion forinputting machining program data; a data display portion for displayingthe data inputted from the input portion; a decimal point check targetword storage portion for storing a decimal point check target word; awarning judgment value storage unit for storing a predetermined warningjudgment value; and an input data check control portion for comparingthe input data with the decimal point check target word and, if theinput data is the decimal point check target word, comparing numericalvalue data of the input data with the warning judgment value and, if thenumerical value data of the input data is larger or smaller than thewarning judgment value, judging that there is a possibility that adecimal point position mistake may be made and issuing a warning.
 2. Amachining program generating apparatus according to claim 1,characterized in that the warning judgment value is a reference valuefor checking a value that makes the input data as an unnatural inputvalue.
 3. A machining program generating apparatus according to claim 1,characterized in that the input data check control portion performs thecomparison each time a data input is performed.
 4. A machining programgenerating apparatus according to claim 1, characterized in that theinput data check control portion performs the comparison in a batchmanner without performing analysis after the generation of the machiningprogram through the inputting all of the data and beforeexecution/analysis of the machining program.
 5. A machining programgenerating apparatus according to claim 1, further comprising: a warningmessage storage portion for storing a warning message, the machiningprogram generating apparatus being characterized in that the warningmessage stored in the warning message storage portion is displayed onthe data display portion.
 6. A machining program generating apparatusaccording to claim 1, further comprising: a history counter for, whenwarnings are detected as a result of the input data check, recordingnumbers of times of occurrence of the warnings in accordance with thecontents of the warnings for each of at least one programming operation;and a caution message storage portion for storing caution messages, themachining program generating apparatus being characterized in that thecaution messages for urging cautions in performing programming aredisplayed on the data display portion in a descending order of thenumbers of times of occurrence of the warnings based on the contentslastly recorded in the history counter.
 7. A machining programgenerating apparatus according to claim 1, further comprising: a historycounter for, when warnings are detected as a result of the input datacheck, recording numbers of times of occurrence of the warnings inaccordance with the contents of the warnings for each of at least oneprogramming operation; and a history message storage portion for storinga history message, the machining program generating apparatus beingcharacterized in that prior to programming, the numbers of times ofoccurrence of the warnings at the time of previous programmingoperations are graphically displayed on the data display portion in atime-series manner through analysis of the contents recorded in thehistory counter and the history message is also displayed.
 8. Amachining program generating apparatus for generating a machiningprogram for numerical control, comprising: an input portion forinputting machining program data; a data display portion for displayingthe data inputted from the input portion; a decimal point check targetword storage portion for storing a decimal point check target word; adecimal point input specification storage portion for storing whetherthe apparatus adopts a specification where if the input data is notgiven a decimal point, the data is to be dealt with as data in a minimumcommand unit; a warning judgment value storage unit for storing awarning judgment value corresponding to the apparatus specificationwhere if the input data is not given a decimal point, the data is to bedealt with as data in the minimum command unit and a warning judgmentvalue under an apparatus specification where if the input data is notgiven a decimal point, the data is to be dealt with as data in a mmunit; and an input data check control portion for comparing the inputdata with the decimal point check target word and, if the input data isthe decimal point check target word, comparing numerical value data ofthe input data with the warning judgment value corresponding to thespecification and stored in the warning judgment value storage portion,and if the numerical value data of the input data is larger or smallerthan the warning judgment value, issuing a warning.
 9. A machiningprogram generating apparatus according to claim 8, characterized in thatthe warning judgment value is a reference value for checking a valuethat makes the input data as an unnatural input value.
 10. A machiningprogram generating apparatus according to claim 8, characterized in thatthe input data check control portion performs the comparison each time adata input is performed.
 11. A machining program generating apparatusaccording to claim 8, characterized in that the input data check controlportion performs the comparison in a batch manner without performinganalysis after the generation of the machining program through theinputting all of the data and before execution/analysis of the machiningprogram.
 12. A machining program generating apparatus according to claim8, further comprising: a warning message storage portion for storing awarning message, the machining program generating apparatus beingcharacterized in that the warning message stored in the warning messagestorage portion is displayed on the data display portion.
 13. Amachining program generating apparatus according to claim 8, furthercomprising: a history counter for, when warnings are detected as aresult of the input data check, recording numbers of times of occurrenceof the warnings in accordance with the contents of the warnings for eachof at least one programming operation; and a caution message storageportion for storing caution messages, the machining program generatingapparatus being characterized in that the caution messages for urgingcautions in performing programming are displayed on the data displayportion in a descending order of the numbers of times of occurrence ofthe warnings based on the contents lastly recorded in the historycounter.
 14. A machining program generating apparatus according to claim8, further comprising: a history counter for, when warnings are detectedas a result of the input data check, recording numbers of times ofoccurrence of the warnings in accordance with the contents of thewarnings for each of at least one programming operation; and a historymessage storage portion for storing a history message, the machiningprogram generating apparatus being characterized in that prior toprogramming, the numbers of times of occurrence of the warnings at thetime of previous programming operations are graphically displayed on thedata display portion in a time-series manner through analysis of thecontents recorded in the history counter and the history message is alsodisplayed.